<template>
  <el-menu
    :default-active="router.currentRoute.value.fullPath" unique-opened
    active-text-color="#ffd04b" background-color="#545c64" text-color="#fff"
  >
    <menu-item v-for="item of routes" :item="item"></menu-item>
  </el-menu>
  <router-view></router-view>
</template>
<script setup>
import MenuItem from './components/menuItem';
import router from './router';
import {routes} from './router';
</script>
<style lang="scss">
#app {
  height: 100vh;
  width: 100vw;
  display: flex;
  .el-menu {
    flex: 0 0 240px;
    overflow-x: hidden;
  }
  .page {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    position: relative;
  }
}
</style>
